package com.fangfayinyong;

public class StudentDemo {
    public static void main(String[] args) {
        // Lambda表达是
        useStudnetBuilder((name, age)->new Student(name,age));
        // 引用构造器
        useStudnetBuilder(Student::new);
        // lambda被构造器替代的时候，它的形参全部给构造器作为参数
    }

    private static void useStudnetBuilder(StudentBuilder s){
        Student stu = s.build("around", 44);
        System.out.println(stu.getName() + "," + stu.getAge());
    }
}
